<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>BOS管理系统首页</title>
		<script type="text/javascript" src="../js/jquery-1.8.3.js"></script>
		<script type="text/javascript" src="../js/easyui/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="../js/easyui/locale/easyui-lang-zh_CN.js"></script>
		<link rel="stylesheet" href="../js/easyui/themes/default/easyui.css" />
		<link rel="stylesheet" href="../js/easyui/themes/icon.css" />
		<script src="../js/ztree/jquery.ztree.all-3.5.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" type="text/css" href="../js/ztree/zTreeStyle.css" />

	</head>

	<script type="text/javascript">
		$(function() {
			var setting = {
				data: {
					simpleData: {
						enable: true,
						idKey: "id",
						pIdKey: "pId"
					}
				},
				callback: {
					onClick: function(event, treeId, treeNode, clickFlag) {
						var content = '<div style="width:100%;height:100%;overflow:hidden;">' +
							'<iframe src="' + treeNode.page + '" scrolling="auto" style="width:100%;height:100%;border:0;" ></iframe></div>';

						if(treeNode.page != undefined && treeNode.page != "") {
							if($("#myTabs").tabs('exists', treeNode.name)) {
								$("#myTabs").tabs('select', treeNode.name);
							} else {
								$("#myTabs").tabs('add', {
									title: treeNode.name,
									content: content,
									closable: true
								});

							}
						}
					}
				}
			};

			var zNodes = [
				{ id: 1, pId: 0, name: "父节点一" },
				{ id: 2, pId: 0, name: "父节点二" },
				{ id: 11, pId: 1, name: "子节点一" },
				{ id: 12, pId: 1, name: "子节点二" },
				{ id: 13, pId: 2, name: "百度", page: "http://www.baidu.com" },
				{ id: 14, pId: 2, name: "传智播客", page: "http://www.itcast.cn" }
			];

			$.fn.zTree.init($("#tree"), setting, zNodes);

		});
	</script>
	</head>

	<body class="easyui-layout">

		<div data-options="region:'north',title:'公司Logo',split:true" style="height:100px;"></div>

		<div data-options="region:'south',title:'公司版权信息',split:true" style="height:100px;"></div>

		<div data-options="region:'east',iconCls:'icon-reload',title:'搜索区域',split:true" style="width:100px;"></div>

		<div data-options="region:'west',title:'菜单导航',split:true" style="width:200px;">
			<div id="myAccording" class="easyui-accordion" data-options="fit:true" style="width:300px;height:200px;">

				<div data-options="iconCls:'icon-add',title:'基本功能'" style="overflow:auto;padding:10px;">

					<ul id="tree" class="ztree"></ul>

				</div>

				<div title="系统管理" data-options="iconCls:'icon-add',selected:true" style="padding:10px;">

				</div>

			</div>

		</div>

		<div data-options="region:'center'" style="padding:5px;background:#eee;">

			<div id="myTabs" class="easyui-tabs" data-options="fit:true" style="width:500px;height:250px;">
				<div title="Tab1" style="padding:20px;display:none;">tab1 </div>

				<div title="Tab2" data-options="closable:true" style="overflow:auto;padding:20px;display:none;">tab2 </div>

				<div title="Tab3" data-options="iconCls:'icon-reload',closable:true" style="padding:20px;display:none;">tab3 </div>

			</div>

		</div>

	</body>

</html>